using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._3DAnalystTools._PointCloud._Classification
{
    /// <summary>
    /// <para>Classify LAS Noise</para>
    /// <para>Classifies LAS points with anomalous spatial characteristics as noise.</para>
    /// <para>将具有异常空间特征的 LAS 点分类为噪声。</para>
    /// </summary>    
    [DisplayName("Classify LAS Noise")]
    public class ClassifyLasNoise : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ClassifyLasNoise()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_las_dataset">
        /// <para>Input LAS Dataset</para>
        /// <para>The LAS dataset to process.</para>
        /// <para>要处理的 LAS 数据集。</para>
        /// </param>
        public ClassifyLasNoise(object _in_las_dataset)
        {
            this._in_las_dataset = _in_las_dataset;
        }
        public override string ToolboxName => "3D Analyst Tools";

        public override string ToolName => "Classify LAS Noise";

        public override string CallName => "3d.ClassifyLasNoise";

        public override List<string> AcceptEnvironments => ["geographicTransformations", "outputCoordinateSystem", "workspace"];

        public override object[] ParameterInfo => [_in_las_dataset, _method.GetGPValue(), _edit_las.GetGPValue(), _withheld.GetGPValue(), _compute_stats.GetGPValue(), _ground, _low_z, _high_z, _max_neighbors, _step_width, _step_height, _extent, _process_entire_files.GetGPValue(), _out_feature_class, _out_las_dataset, _update_pyramid.GetGPValue()];

        /// <summary>
        /// <para>Input LAS Dataset</para>
        /// <para>The LAS dataset to process.</para>
        /// <para>要处理的 LAS 数据集。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input LAS Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_las_dataset { get; set; }


        /// <summary>
        /// <para>Method</para>
        /// <para><xdoc>
        ///   <para>Specifies the noise detection method that will be used.</para>
        ///   <bulletList>
        ///     <bullet_item>Isolation—The spatial proximity of LAS points will be analyzed in tiled volumes to determine noise measurements along with height-based noise detection. This is the default.</bullet_item><para/>
        ///     <bullet_item>Relative Height from Ground—All points below the specified minimum height from the ground surface and above the maximum height from the ground surface will be identified as noise.</bullet_item><para/>
        ///     <bullet_item>Absolute Height—All points below the specified minimum height and above the maximum height in relation to mean sea level will be identified as noise.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将使用的噪声检测方法。</para>
        ///   <bulletList>
        ///     <bullet_item>隔离—将在切片体积中分析 LAS 点的空间邻近性，以确定噪声测量值以及基于高度的噪声检测。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>距地面的相对高度 - 低于指定距地面的最小高度和高于距地面的最大高度的所有点都将被标识为噪声。</bullet_item><para/>
        ///     <bullet_item>绝对高度 - 所有低于指定最小高度和高于相对于平均海平面的最大高度的点都将被标识为噪声。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Method")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _method_value _method { get; set; } = _method_value._ISOLATION;

        public enum _method_value
        {
            /// <summary>
            /// <para>Isolation</para>
            /// <para>Isolation—The spatial proximity of LAS points will be analyzed in tiled volumes to determine noise measurements along with height-based noise detection. This is the default.</para>
            /// <para>隔离—将在切片体积中分析 LAS 点的空间邻近性，以确定噪声测量值以及基于高度的噪声检测。这是默认设置。</para>
            /// </summary>
            [Description("Isolation")]
            [GPEnumValue("ISOLATION")]
            _ISOLATION,

            /// <summary>
            /// <para>Relative Height from Ground</para>
            /// <para>Relative Height from Ground—All points below the specified minimum height from the ground surface and above the maximum height from the ground surface will be identified as noise.</para>
            /// <para>距地面的相对高度 - 低于指定距地面的最小高度和高于距地面的最大高度的所有点都将被标识为噪声。</para>
            /// </summary>
            [Description("Relative Height from Ground")]
            [GPEnumValue("RELATIVE_HEIGHT")]
            _RELATIVE_HEIGHT,

            /// <summary>
            /// <para>Absolute Height</para>
            /// <para>Absolute Height—All points below the specified minimum height and above the maximum height in relation to mean sea level will be identified as noise.</para>
            /// <para>绝对高度 - 所有低于指定最小高度和高于相对于平均海平面的最大高度的点都将被标识为噪声。</para>
            /// </summary>
            [Description("Absolute Height")]
            [GPEnumValue("ABSOLUTE_HEIGHT")]
            _ABSOLUTE_HEIGHT,

        }

        /// <summary>
        /// <para>Edit Classification</para>
        /// <para><xdoc>
        ///   <para>Specifies whether LAS points that are identified as noise will be reclassified.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Noise points will be reclassified. This is the default.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Noise points will not be classified.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否对标识为噪声的 LAS 点进行重分类。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 噪声点将被重新分类。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>未选中 - 噪声点将不被分类。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Edit Classification")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _edit_las_value _edit_las { get; set; } = _edit_las_value._true;

        public enum _edit_las_value
        {
            /// <summary>
            /// <para>CLASSIFY</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("CLASSIFY")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_CLASSIFY</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_CLASSIFY")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Assign Withheld Flag</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the withheld classification flag will be assigned to noise points. This option is only enforced if the Edit Classification parameter is checked.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—The withheld classification flag will be assigned to noise points.</bullet_item><para/>
        ///     <bullet_item>Unchecked—The withheld classification flag will not be assigned to noise points. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否将保留的分类标志分配给干扰点。仅当选中“编辑分类”参数时，才会强制执行此选项。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 将保留的分类标志分配给噪声点。</bullet_item><para/>
        ///     <bullet_item>未选中 - 不会将保留的分类标志分配给噪声点。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Assign Withheld Flag")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _withheld_value _withheld { get; set; } = _withheld_value._false;

        public enum _withheld_value
        {
            /// <summary>
            /// <para>WITHHELD</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("WITHHELD")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_WITHHELD</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_WITHHELD")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Compute statistics</para>
        /// <para><xdoc>
        ///   <para>Specifies whether statistics will be computed for the .las files referenced by the LAS dataset. Computing statistics provides a spatial index for each .las file, which improves analysis and display performance. Statistics also enhance the filtering and symbology experience by limiting the display of LAS attributes, such as classification codes and return information, to values that are present in the .las file.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Statistics will be computed. This is the default.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Statistics will not be computed.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否为 LAS 数据集引用的 .las 文件计算统计数据。计算统计为每个 .las 文件提供空间索引，从而提高分析和显示性能。统计数据还通过将 LAS 属性（如分类代码和返回信息）的显示限制为 .las 文件中存在的值来增强过滤和符号系统体验。</para>
        ///   <bulletList>
        ///     <bullet_item>选中—将计算统计数据。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>未选中—不计算统计数据。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Compute statistics")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _compute_stats_value _compute_stats { get; set; } = _compute_stats_value._true;

        public enum _compute_stats_value
        {
            /// <summary>
            /// <para>COMPUTE_STATS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("COMPUTE_STATS")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_COMPUTE_STATS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_COMPUTE_STATS")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Ground</para>
        /// <para>The ground surface that will be used to define relative height.</para>
        /// <para>将用于定义相对高度的地面。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Ground")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _ground { get; set; } = null;


        /// <summary>
        /// <para>Minimum Height</para>
        /// <para>The height that will define the lowest z-value threshold for identifying noise points. Any point that is lower than the specified value will be classified as noise. If a ground surface is specified, this threshold will be based on an offset from the ground such that a value of -3 feet means any points that are 3 feet below the ground surface will be classified as noise.</para>
        /// <para>将定义用于识别噪声点的最低 z 值阈值的高度。任何低于指定值的点都将被归类为噪声。如果指定了地表，则此阈值将基于与地面的偏移，因此值 -3 英尺表示地表以下 3 英尺的任何点都将被归类为噪声。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Minimum Height")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string? _low_z { get; set; } = null;


        /// <summary>
        /// <para>Maximum Height</para>
        /// <para>The height that will define the highest z-value threshold for identifying noise points. Any point that is higher than the specified value will be classified as noise. If a ground surface is provided, this threshold will be based on an offset from the ground such that a value of 250 meters means any points that are higher than 250 meters above the ground surface will be classified as noise.</para>
        /// <para>将定义用于识别噪声点的最高 z 值阈值的高度。任何高于指定值的点都将被归类为噪声。如果提供了地表，则此阈值将基于与地面的偏移，因此值 250 米表示高于地表 250 米的任何点都将被归类为噪声。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Maximum Height")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string? _high_z { get; set; } = null;


        /// <summary>
        /// <para>Neighborhood Point Limit</para>
        /// <para>The maximum number of points in the analysis volume that can be qualified as noise when using the Isolation method. If the analysis volume contains any number of LAS points that are equal to or less than this value, those points will be classified as noise.</para>
        /// <para>使用隔离方法时，分析体积中可限定为噪声的最大点数。如果分析体积包含等于或小于此值的任意数量的 LAS 点，则这些点将被归类为噪声。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Neighborhood Point Limit")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long? _max_neighbors { get; set; } = null;


        /// <summary>
        /// <para>Neighborhood Width</para>
        /// <para>The size of each dimension in the XY space of the analysis volume when using the Isolation method.</para>
        /// <para>使用隔离方法时分析体积的 XY 空间中每个维度的大小。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Neighborhood Width")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string? _step_width { get; set; } = null;


        /// <summary>
        /// <para>Neighborhood Height</para>
        /// <para>The height of the analysis volume when using the Isolation method.</para>
        /// <para>使用隔离方法时分析体积的高度。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Neighborhood Height")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string? _step_height { get; set; } = null;


        /// <summary>
        /// <para>Processing Extent</para>
        /// <para><xdoc>
        ///   <para>The extent of the data that will be evaluated.</para>
        ///   <bulletList>
        ///     <bullet_item>Default—The extent will be based on the maximum extent of all participating inputs. This is the default.</bullet_item><para/>
        ///     <bullet_item>Union of Inputs—The extent will be based on the maximum extent of all inputs.</bullet_item><para/>
        ///     <bullet_item>Intersection of Inputs—The extent will be based on the minimum area common to all inputs.</bullet_item><para/>
        ///     <bullet_item>Current Display Extent—The extent is equal to the visible display. The option is not available when there is no active map.</bullet_item><para/>
        ///     <bullet_item>As Specified Below—The extent will be based on the minimum and maximum extent values specified.</bullet_item><para/>
        ///     <bullet_item>Browse—The extent will be based on an existing dataset.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将评估的数据范围。</para>
        ///   <bulletList>
        ///     <bullet_item>默认值 - 范围将基于所有参与输入的最大范围。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>输入并集 - 范围将基于所有输入的最大范围。</bullet_item><para/>
        ///     <bullet_item>输入交点 - 范围将基于所有输入共有的最小面积。</bullet_item><para/>
        ///     <bullet_item>当前显示范围 - 范围等于可见显示。当没有活动地图时，该选项不可用。</bullet_item><para/>
        ///     <bullet_item>如下所述 - 范围将基于指定的最小和最大范围值。</bullet_item><para/>
        ///     <bullet_item>浏览 - 范围将基于现有数据集。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Processing Extent")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _extent { get; set; } = null;


        /// <summary>
        /// <para>Process entire LAS files that intersect extent</para>
        /// <para><xdoc>
        ///   <para>Specifies how the area of interest will be used in determining how .las files will be processed. The area of interest is defined by the Processing Extent parameter value, the Processing Boundary parameter value, or a combination of both.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—Only LAS points that intersect the area of interest will be processed. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—If any portion of a .las file intersects the area of interest, all the points in that .las file, including those outside the area of interest, will be processed.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定在确定如何处理 .las 文件时如何使用感兴趣区域。感兴趣区域由“处理范围”参数值、“处理边界”参数值或两者的组合定义。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中—仅处理与感兴趣区域相交的 LAS 点。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中 - 如果 .las 文件的任何部分与感兴趣区域相交，则将处理该 .las 文件中的所有点，包括感兴趣区域之外的点。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Process entire LAS files that intersect extent")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _process_entire_files_value _process_entire_files { get; set; } = _process_entire_files_value._false;

        public enum _process_entire_files_value
        {
            /// <summary>
            /// <para>PROCESS_ENTIRE_FILES</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("PROCESS_ENTIRE_FILES")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>PROCESS_EXTENT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("PROCESS_EXTENT")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Output Noise Points</para>
        /// <para>The output point features that represent the LAS points identified as noise.</para>
        /// <para>表示标识为噪声的 LAS 点的输出点要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Noise Points")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _out_feature_class { get; set; } = null;


        /// <summary>
        /// <para>Output LAS Dataset</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output LAS Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_las_dataset { get; set; }


        /// <summary>
        /// <para>Update pyramid</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the LAS dataset pyramid will be updated after the class codes are modified.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—The LAS dataset pyramid will be updated. This is the default.</bullet_item><para/>
        ///     <bullet_item>Unchecked—The LAS dataset pyramid will not be updated.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定修改类代码后是否更新 LAS 数据集金字塔。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 将更新 LAS 数据集金字塔。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>未选中—LAS 数据集金字塔将不会更新。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Update pyramid")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _update_pyramid_value _update_pyramid { get; set; } = _update_pyramid_value._true;

        public enum _update_pyramid_value
        {
            /// <summary>
            /// <para>UPDATE_PYRAMID</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("UPDATE_PYRAMID")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_UPDATE_PYRAMID</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_UPDATE_PYRAMID")]
            [GPEnumValue("false")]
            _false,

        }

        public ClassifyLasNoise SetEnv(object geographicTransformations = null, object outputCoordinateSystem = null, object workspace = null)
        {
            base.SetEnv(geographicTransformations: geographicTransformations, outputCoordinateSystem: outputCoordinateSystem, workspace: workspace);
            return this;
        }

    }

}